.image-gallery-wrapper {
  width: 100%;
  position: relative;
}

.image-gallery {
  position: relative;
  width: 100%;
  cursor: pointer;

  .image-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
  }

  .gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  // 单张图片布局
  &.single-image {
    .image-container {
      border-radius: 12px;
    }
  }

  // 两张图片布局
  &.two-images {
    .image-grid {
      display: flex;
      height: 100%;
      gap: 8px;

      .image-container {
        flex: 1;
        height: 100%;
      }
    }
  }

  // 三张图片布局
  &.three-images {
    .image-grid {
      display: flex;
      height: 100%;
      gap: 8px;

      .main-image {
        flex: 1;
        height: 100%;

        .image-container {
          height: 100%;
        }
      }

      .sub-images {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 8px;

        .sub-image {
          flex: 1;
          position: relative;

          .image-container {
            height: 100%;
          }
        }
      }
    }
  }

  // 多张图片布局（>3张）
  &.multiple-images {
    .image-grid {
      display: flex;
      height: 100%;
      gap: 8px;

      .main-image {
        flex: 1;
        height: 100%;

        .image-container {
          height: 100%;
        }
      }

      .sub-images {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 8px;

        .sub-image {
          flex: 1;
          position: relative;

          .image-container {
            height: 100%;
          }

          &.overlay {
            .overlay-content {
              position: absolute;
              top: 0;
              left: 0;
              right: 0;
              bottom: 0;
              background-color: rgba(0, 0, 0, 0.4);
              display: flex;
              align-items: center;
              justify-content: center;
              border-radius: 8px;

              .overlay-text {
                color: #fff;
                font-size: 18px;
                font-weight: bold;
                text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
              }
            }
          }
        }
      }
    }
  }
}

// 响应式设计
@media (max-width: 480px) {
  .image-gallery {
    &.two-images,
    &.three-images,
    &.multiple-images {
      .image-grid {
        gap: 4px;
      }

      .sub-images {
        gap: 4px;
      }
    }

    &.multiple-images {
      .overlay-content {
        .overlay-text {
          font-size: 16px;
        }
      }
    }
  }
}
